From baabb96f5c637561f68a9dd8038b6a903b2a7493 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 11 Mar 2011 17:27:25 +0000 Subject: [PATCH] x86: Clean up wbinvd usage in cpu offline paths. No need to wbinvd before HLT (entering C1) as the processor continues to participate in the full cache coherency protocol in this sleep state. Signed-off-by: Keir Fraser --- xen/arch/x86/acpi/cpu_idle.c | 5 ++--- xen/arch/x86/domain.c | 6 ------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index 3f947841d0..a2368d39b1 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -567,8 +567,8 @@ static void acpi_dead_idle(void) if ( cx->entry_method == ACPI_CSTATE_EM_FFH ) { /* - * cache must be flashed as the last ops before cpu going into dead, - * otherwise, cpu may dead with dirty data breaking cache coherency, + * Cache must be flushed as the last operation before sleeping. + * Otherwise, CPU may still hold dirty data, breaking cache coherency, * leading to strange errors. */ wbinvd(); @@ -593,7 +593,6 @@ static void acpi_dead_idle(void) } default_halt: - wbinvd(); for ( ; ; ) halt(); } diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index a024e198e9..b859cd576f 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -93,12 +93,6 @@ static void default_idle(void) static void default_dead_idle(void) { - /* - * cache must be flashed as the last ops before cpu going into dead, - * otherwise, cpu may dead with dirty data breaking cache coherency, - * leading to strange errors. - */ - wbinvd(); for ( ; ; ) halt(); } -- 2.30.2